<template>
  <div class="receiver">
    <van-address-edit
      :area-list="areaList"
      show-postal
      show-set-default
      save-button-text="确定"
      :area-columns-placeholder="['请选择', '请选择', '请选择']"
      @save="onSave"
    />
  </div>
</template>

<script>
import areaList from '@/components/area/area'
export default {
  name: 'Receiver',
  data() {
    return {
      areaList,
      address: {}
    }
  },
  methods: {
    onSave(content) {
      this.address = { ...content }
      localStorage.setItem('receiver', JSON.stringify(this.address))
      this.$router.push('/express')
    }
  }
}
</script>

<style lang="less" scoped>
/deep/.van-button {
  background-color: #3b95fa;
  border: none;
}
</style>
